//
//  UINavigationBar+NSUINavigationBar.m
//  XinDong
//
//  Created by tt on 12-11-12.
//  Copyright (c) 2012年 HengYongKeJi. All rights reserved.
//

#import "NSUINavigationBar.h"

@implementation UINavigationBar (NSUINavigationBar)

- (void)drawRect:(CGRect)rect
{
    UIImage *backgroundImage = nil;
    backgroundImage = [UIImage imageNamed:@"topbar_back.png"];
    [backgroundImage drawInRect:rect];
}

@end

@implementation UINavigationItem (NSUINavigationItem)

- (void)addTitle:(NSString *)title {
    self.titleView = nil;
	UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(50.f, 7.f, 180.f, 30.f)];
	titleLabel.textAlignment = UITextAlignmentCenter;
	titleLabel.textColor = [UIColor whiteColor];
	titleLabel.font = [UIFont boldSystemFontOfSize:20];
	titleLabel.backgroundColor = [UIColor clearColor];
	if (title) titleLabel.text = title;
	self.titleView = titleLabel;
}
@end

